home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 11
/
Cream of the Crop 11-2.iso
/
os2
/
rsynth1.zip
/
readme.os2
< prev
next >
Wrap
Text File
|
1995-12-19
|
5KB
|
107 lines
This is a rough port of Rsynth2.0, an English text-> speech app originally written
for a Sun Sparcstation. I will not be working on this further, so I am making this
available in hopes that some other programmer will pick up the torch and complete
this. If you desire to be this programmer, or if you use this for anything,
please contact me (djd@cris.com) and let me know what you have accomplished and
how you have accomplished it.
Rsynth, with just a little work, can be modified to become a Speech output library,
good for that talking Web Browser the world so desparately needs. Or maybe the
IRC client that speaks......
Using the Executables:
There are three OS/2 executables in this Zip file. They are all written with EMX/GCC,
so you will need the EMXRT stuff to use them. They are:
Say.exe - the actual text->speech app
mkdictdb.exe - Makes the required Dictionary Database file from an external Dictionary
dlookup.exe - Looks up Phonemes from the database Dictionary.
Running Say.exe:
Typing "Say --help" on the command line will show you all the command line options. The
important ones for OS/2 are as follows:
-o filename This saves a file in AU format. If you have installed MMOS/2 AU sound
support, you can then use PLAY.CMD to listen to it. AU sound support
for MMOS/2 is part of the Warp BonusPak - you will need to install
this if you have yet to do so.
-f frequency Fundamental Frequency for the voice - default is 1330 Hz.
-v Verbose output- print a lot of stuff to the screen while doing
the conversion. Using this will currently cause a floating point
underflow exception, so I recommend not using it, unless you enjoy
floating point underflow exceptions.
<filename get text to say from file filename, otherwise takes stuff to say
from command line.
Sayit.cmd is a simple REXX program that will speak words entered at the command line,
typing 'sayit Hello there OS/2 user' will result in your computer saying hello to you.
I have added some of the additional command line parameters there to produce what I
think is better speech output - YMMV.
Mkdictdb.exe:
dlookup.exe :
I have not included a dictionary or a dictionary database in the distribution. Say
will work without it, but is more accurate in pronunciation with one. Read the README
file for information as to where to find American English and British English
dictionaries and how to convert them using mkdictdb.exe. These dictionaries are in
a fairly simple ASCII format, so it is pretty easy to modify or add words to them.
So, for instance, the word "LuxuryYacht" could actually be pronounced
Throat-Warbler-Mangrove, or you could do horrible things to the pronunciation of
the word "Microsoft". Or you could actually do something useful with it - your choice.
Be warned that the resulting Dictionary file is fairly large. Say.exe looks for a
dictionary file in the current working directory named Adict.db by default, the
command line switch -d b causes it to look for the alternate dictionary bdict.db.
Notes for Programmers:
Everything here compiles under EMX/GCC, using Gnumake as the make utility. You will
also need to have GNU GDBM ported over to OS/2 - I highly recommend Kai Uwe Rommel's
port, which can currently be found on ftp.leo.org. Your mileage may vary with other
development environments.
Stuff that needs to be done:
Floating Point Underflow problem
EMX/GCC by default masks all floating point underflows, with the action of returning
a zero when an underflow occurs. This works great until something fprints to stdout
or stderr, which will cause the next underflow to raise the exception, killing the
program. This does not occur under GDB (Yuck). My patch has been not to use the
-v option, which prints stuff to the screen, and to kill all other screen output.
There's got to be a better way to handle this - please let me know what it is?
Incidentally, all of the underflows occur in the file nsynth.c.
Sound Output
Having Say.exe write .AU files is kinda kludgy - it should talk directly to MMOS/2.
Not only that, but it should write WAV files, not AU files, if file writing is
desired. This is done by writing real functions in hplay.c, instead of the dummy
ones currently in there. I'd like to see the results of this as well, if anyone
tackles this one.
Creating a Speech Output Library
It should be fairly easy to take functions from say.c and create a speech output
API - speech_init(), Say_string(), say_file(), Speech_close() would be a minimal
function set.
Placing the dictionary in a standard place
Anywhere in the path? In TCPIP\ETC? whatever....
Mods to Improve Speech Output Quality
ANyway, that should get you started. If you play with this code, I'd really appreciate
seeing what you've done with it. Happy Speechifying!
Derek J Decker djd@cris.com